<header>
	<div class="w980 f-cb">
		<?php if($uid) {?>
			<div class="logout fr"><a href="<?php echo site_url('/login/logout')?>">退出</a></div>
			<div class="user fr f-cb">
				<img src="<?php $photo = $userinfo['photo'] ? one_upload($userinfo['photo']) : ''; echo $photo ? UPLOAD_URL.$photo['url'] : static_file('avatar.png'); ?>" class="user-img fl" width="32" height="32">
				<div class="user-name fr"><?php echo $userinfo['uname']?></div>
			</div>
		<?php } else {?>
			<div class="logout fr"><a href="<?php echo site_url('/login')?>">登录</a> </div>
			<div class="user fr f-cb">
			</div>
		<?php }?>
	</div>
</header>